<script>
	import Icon from './Icon.svelte';

	export let icon;
	export let size = '28px';
</script>

<button on:click>
	{#if icon}
		<Icon name={icon} {size} />
	{/if}
	<slot />
</button>

<style>
	button {
		background-color: transparent;
		padding: 4px;
		border: none;
		cursor: pointer;
	}
	button:hover {
		transform: scale(1.2);
		filter: brightness(1.2);
	}
</style>
